package com.matrix.admin.open.test.controller;

import com.matrix.admin.open.test.service.IApachePoiTestService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuweizhong
 * @since 2025-09-11 08:50
 */
@Tag(name = "开放ApachePoi测试接口", description = "开放ApachePoi测试接口")
@RestController
@RequestMapping("/open/poi")
public class ApachePoiTestController {

    @Resource
    private IApachePoiTestService apachePoiTestService;

    /**
     * 返回 void
     *
     * @param response response
     */
    @Operation(summary = "导出Excel测试", description = "导出Excel测试")
    @GetMapping("/exportExcel")
    public void exportExcel(HttpServletResponse response) {
        apachePoiTestService.exportExcel(response);
    }

    @Operation(summary = "导出Word测试", description = "导出Word测试")
    @GetMapping("/exportWord")
    public void exportWord(HttpServletResponse response) {
        apachePoiTestService.exportWord(response);
    }
}
